<style scoped lang="scss">
	.container {
		padding-top: R(20);
	}

	.terminal-info-content {
		margin: 0 R(20px);
		border-radius: R(20);
		background: #fff url(../../../../common/images/newIcon/com-bg2.png) no-repeat;
		background-size: 100% auto;
	}
</style>
<template>
	<div class="container">
		<div class="terminal-info-content" v-if="customData.agentName">
			<u-cell-item :arrow="false" hover-class="none" title="代理商编号：" :value="customData.agentNo"><i
					slot="right-icon" class="iconfont icon-niantie" @click="copy(customData.agentNo)"></i>
			</u-cell-item>
			<u-cell-item :arrow="false" hover-class="none" title="代理商名称：" :value="customData.agentName" />
			<u-cell-item :arrow="false" hover-class="none" title="商户号：" :value="customData.merchNo" />
			<u-cell-item :arrow="false" hover-class="none" title="商户名称：" :value="customData.merchName" />

			<u-cell-item :arrow="false" hover-class="none" title="政策：" :value="customData.policyName" />
			<u-cell-item :arrow="false" hover-class="none" title="政策代码：" :value="customData.policyCode" />
			<u-cell-item :arrow="false" hover-class="none" title="机具SN号：" :value="customData.serialno"><i
					slot="right-icon" class="iconfont icon-niantie" @click="copy(customData.serialno)"></i>
			</u-cell-item>
			<u-cell-item :arrow="false" hover-class="none" title="考核状态："
				:value="customData.checkStatus == -1 ? '考核失败' : customData.checkStatus == 0 ? '待考核' : customData.checkStatus == 1 ? '考核中' : '考核成功'" />

			<u-cell-item :arrow="false" hover-class="none" title="考核开始时间：" :value="customData.startDate"
				class="agent-info-list-cell" />
			<u-cell-item :arrow="false" hover-class="none" title="考核结束时间：" :value="customData.endDate"
				class="agent-info-list-cell" />
			<u-cell-item :arrow="false" hover-class="none" title="考核金额：" :value="customData.checkAmount" />
			<u-cell-item :arrow="false" hover-class="none" title="实际交易金额：" :value="customData.totalAmount" />
			<u-cell-item :arrow="false" hover-class="none" title="考核交易类型名称：" :value="customData.totalTypeName" />
			<u-cell-item :arrow="false" hover-class="none" title="达标等级：" :value="customData.cond" />
			<!-- <u-cell-item :arrow="false" hover-class="none" title="达标奖励金额：" :value="customData.awardAmount" /> -->
			<u-cell-item :arrow="false" hover-class="none" title="订单号：" :value="customData.orderNo"><i
					slot="right-icon" class="iconfont icon-niantie" @click="copy(customData.orderNo)"></i>
			</u-cell-item>
			<u-cell-item :arrow="false" hover-class="none" title="达标日期：" :value="customData.standardDate" />
		</div>
	</div>
</template>

<script>
	import {
		getInfo
	} from "_a/tripartiteData";
	export default {
		name: "Info",
		data() {
			return {
				customData: {},
			};
		},
		onLoad(o) {
			const id = o.id;
			this.initInfo(id);
		},
		methods: {
			copy() {},
			initInfo(id) {
				getInfo(id).then((res) => {
					if (res.code === 200) {
						this.customData = res.data;
					}
				});
			},
			copy(value) {
				uni.setClipboardData({
					data: value,
					success: () => {
						this.$tip.toast('复制成功!');
					}
				});
			}
		},
	};
</script>
